Attribute VB_Name = "mdlFSO"
Option Explicit

Dim fso As New FileSystemObject

Public Function FileExists(path) As Boolean
    FileExists = fso.FileExists(path)
End Function

Public Function BuildFolder(ByVal path As String) As Boolean
    Dim mPath As String
    path = Replace$(path, "/", "\")
    mPath = path
    On Error GoTo hErr
        Do Until fso.FolderExists(path)
            fso.CreateFolder (path)
            path = mPath
        Loop
    BuildFolder = True
    Exit Function
hErr:
    If InStrRev(path, "\") = 0 Then
        BuildFolder = False
        Exit Function
    End If
    path = Left$(path, InStrRev(path, "\") - 1)
    Resume
End Function
